package application

import (
	"shyxy-model-agent/core/config"
	"shyxy-model-agent/pkg/model"
)

type Application struct {
	modelLoader       *model.ModelLoader
	applicationConfig *config.ApplicationConfig
	dbLoader          *config.DBLoader
}

func newApplication(appConfig *config.ApplicationConfig) *Application {
	return &Application{
		modelLoader:       model.NewModelLoader(appConfig.SingleBackend),
		applicationConfig: appConfig,
		dbLoader:          config.NewDBLoader(appConfig.ConfigsDir),
	}
}

func (a *Application) ModelLoader() *model.ModelLoader {
	return a.modelLoader
}

func (a *Application) ApplicationConfig() *config.ApplicationConfig {
	return a.applicationConfig
}
func (a *Application) DBLoader() *config.DBLoader {
	return a.dbLoader
}
